﻿using day002;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace day001_3
{
     class Program
    {
        static void Main(string[] args)
        {
            //当x，y为class类型时
            Console.WriteLine("当x，y为class类型时");
            VectorClass x, y;
            x = new VectorClass();
            y = new VectorClass();
            x.Value = 30;
            
            Console.WriteLine("x的值为：" + x.Value);
            Console.WriteLine("y的值为：" + y.Value);
            Console.WriteLine("------ x = new VectorClass(); y = new VectorClass(); /n ,改变y的值后，x值不变-----");
            y.Value = 50;
            Console.WriteLine("x的值为：" + x.Value);
            Console.WriteLine("y的值为：" + y.Value);
            Console.WriteLine("----------------------------");

            //当a，b为class类型时
            Console.WriteLine("当a，b为class类型时");
            VectorStruct a, b;
            a = new VectorStruct();
            b = new VectorStruct();
            a.Value = 30;           
            Console.WriteLine("x的值为：" + a.Value);
            Console.WriteLine("y的值为：" + b.Value);
            Console.WriteLine("------a = new VectorStruct();b = new VectorStruct();,改变b的值后，a值不变-----");
            b.Value = 50;
            Console.WriteLine("x的值为：" + a.Value);
            Console.WriteLine("y的值为：" + b.Value);

            Console.ReadKey();
        }
    }
}
